package com.shareinfo.adminManage.shiro;

import java.io.Serializable;

/** 
 * 自定义Authentication对象，使得Subject除了携带用户的登录名外还可以携带更多信息. 
 */  
public class ShiroUser implements Serializable{
	
	private static final long serialVersionUID = -5577588064543475816L;
	
	private String loginName;  
    private String name;  

    public ShiroUser(String loginName, String name) {  
        this.loginName = loginName;  
        this.name = name;  
    }  

    public String getLoginName() {  
        return loginName;  
    }  

    /** 
     * 本函数输出将作为默认的<shiro:principal/>输出. 
     */  
    @Override  
    public String toString() {  
        return loginName;  
    }  

    public String getName() {  
        return name;  
    }  
}
